﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>textarea显示记事本文件的内容</title>
    <script type="text/javascript" language="JavaScript">
        function onDownloadDone(s) {
            content.value=s;                    //设置文本框的内容
        }
    </script>
</head>
<body>
<textarea name="content" cols=30 rows=20></textarea>
<div ID="oDownload" STYLE="behavior:url(#default#download)" />
<input type=file name='myfile'>
<input type=button value="打开" onclick="oDownload.startDownload(myfile.value,onDownloadDone)">
</body>
</html>